import random
from ronglian_sms_sdk import SmsSDK


account_sid = "8aaf07087fe90a32017ff2c51866017e"
auth_token = 'ad87a473199446aeab78f5c52f9b912e'
appid = '8aaf07087fe90a32017ff2c519650185'


def sms_code(mobilie):
    tid = '1'
    nums = random.randint(1000, 10000)
    datas = (nums, '5')
    rest = SmsSDK(account_sid, auth_token, appid).sendMessage(tid, mobilie, datas)
    return nums, rest

